package com.nicy.dream.utils;

import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * @description:
 * @projectName:dream
 * @see:com.nicy.dream.utils
 * @author:NicyYe
 * @createTime:2021/2/5 14:21
 * @version:1.0
 */
    @Data
    public class Result {
        int code;
        String msg;

        public Result(int code,String msg){
            this.code=code;
            this.msg=msg;
        }

        public static Result ok(String msg){
            return new Result(200,msg);
        }

        public static Result error(String msg){
            return new Result(500,msg);
        }

}
